/**
 * 引入iconfont
 * @param {String} url 
 */
export const addIconfontLink = (url: string) => {
  if (url && !document.head.querySelector(`link[href="//at.alicdn.com/t/${url}.css"]`)) {
    const link: HTMLLinkElement = document.createElement('link')
    link.rel = 'stylesheet'
    link.href = `//at.alicdn.com/t/${url}.css`
    document.head.appendChild(link)
  }
}
export default addIconfontLink
